
<!--
	user list !
-->
<h3>内容管理
    <small>文章管理</small>
</h3>

<div  ng-controller="unauditedArticleCtrl" class="panel panel-default">
    <div class="articleAudit" ng-repeat="updateItem in articleList" >
        <div ng-if="updateItem.articleId==id" >
            <span ng-click="hide()">×</span>
            <h4 style="text-align: center;margin-bottom:20px;">文章审核</h4>
            <div class="radio">
                <label>
                    <input  type="radio"  name="inp"  value="2"  ng-model="type" >
                    审核通过
                </label>
            </div>
            <div class="radio">
                <label>
                    <input type="radio"  name="inp"  value="3"   ng-model="type" >
                    审核不通过
                </label>
            </div>
            <h6 class="form-group" ng-show="type==3">
                <textarea  rows="1" cols="50" style="width:360px;height:80px;padding:5px;border-radius: 2px;border:1px solid #ddd" type="text" placeholder="1、未通过原因及建议修改部分；2、内容为空时，默认发送文案为：你的文章未通过审核"  ng-model="instructions"/>
            </h6>
            <div class="btn">
                <button ng-click="hide()"  class="btn defalut btn-sm">取消</button>
                <button ng-click="confirm(type,instructions)" class="btn btn-primary btn-sm" >确认</button>
            </div>
        </div>
    </div>
    <div class="btn-group">
        <button class="btn btn-default big-font" ui-sref="cms.article">列表文章</button>
        <button class="btn btn-default big-font" ui-sref="cms.articleNotList">非列表文章</button>
        <button class="btn btn-primary big-font" ui-sref="cms.unauditedArticle">未审投稿</button>
        <button class="btn btn-default big-font" ui-sref="cms.reviewedArticle">已审投稿</button>
    </div>
    <div class="panel-heading">
        <form class="form-inline">
            <div class="form-group">
                <div class="col-sm-6 no_line form-group">
                    <label  style="margin-top:10px;"  for="finalBeginDate" class="date_label col-sm-4 control-label">发布日期</label>
                    <p class="input-group col-sm-8">
                        <input id="finalBeginDate"  type="text" datepicker-popup="{{format}}" ng-model="finalBeginDate.date" is-open="finalBeginDate.opened" min-date="minDate"  ng-change="dataChange()" datepicker-options="dateOptions" ng-required="true" close-text="Close" class="form-control" />
                     <span class="input-group-btn">
                             <button style="height:35px"  type="button" ng-click="openFinalBeginDate($event)" class="btn btn-default">
                                 <em class="fa fa-calendar"></em>
                             </button>
                          </span>
                    </p>
                </div>
                <div class="col-sm-6 no_line form-group">
                    <label  style="margin-top:10px;"  for="finalEndDate" class="date_label col-sm-4 control-label">至</label>
                    <p class="input-group col-sm-8" >
                        <input id="finalEndDate"  type="text" datepicker-popup="{{format}}" ng-model="finalEndDate.date" is-open="finalEndDate.opened" min-date="finalBeginDate.date" max-date="dt"  ng-change="dataChange()" datepicker-options="dateOptions" ng-required="true" close-text="Close" class="form-control" />
                     <span class="input-group-btn">
                       <button style="height:35px"  type="button" ng-click="openFinalEndDate($event)" class="btn btn-default">
                           <em class="fa fa-calendar"></em>
                       </button>
                    </span>
                    </p>
                </div>
            </div>
        </form>
        <form class="form-inline" style="margin-top: 20px">
            <div class="form-group">
                <input type="text" ng-keyup="dataEvent($event)" ng-model="searchKey" class="form-control" style="width: 250px" placeholder="关键字/作者/手机号">
                <label for="" style="margin-left:10px">文章审核状态 ：</label>
                <select class="custom-css form-control center-block" ng-model="reviewStatusSelectValue" ng-change="dataChange()" ng-options="reviewStatusSelectValue._value_  for reviewStatusSelectValue in reviewStatus"></select>
                <label for="" style="margin-left:10px">领域 ： </label>
                <select class="custom-css form-control center-block" ng-model="realmListSelectValue" ng-change="dataChange()" ng-options="realmListSelectValue.name  for realmListSelectValue in realmList"></select>
            </div>
            <!--<button type="button" ui-sref="cms.editorArticle" class="btn btn-labeled btn-success pull-right">-->
               	<!--<span class="btn-label">-->
               		<!--<i class="fa fa-plus"></i>-->
               	<!--</span>新建文章-->
            <!--</button>-->
        </form>
    </div>
    <div class="panel-body " ng-class="loading?'whirl standard':'' " style="border-top: 1px solid #CFDBE2;">
        <table class="table table-striped table-condensed" >
            <thead>
            <tr>
                <th>编号</th>
                <th >标题</th>
                <th>作者</th>
                <!--<th>平台用户</th>-->
                <th>手机</th>
                <th>发布日期</th>
                <!--<th>类型</th>-->
                <!--<th style="padding:7.5px 8px" colspan="3" >-->
                    <!--<ul style="display: flex;margin: 0;  -webkit-padding-start: 0px;">-->
                        <!--<li style="width:33%;border:2px solid #ddd;border-right:none;padding:6px;">阅读量</li>-->
                        <!--<li  style="width:33%;border:2px solid #ddd;border-left:none;border-right:none;padding:6px;">应用内</li>-->
                        <!--<li  style="width:33%;border:2px solid #ddd;border-left:none;padding:6px;">应用外</li>-->
                    <!--</ul>-->

                <!--</th>-->
                <!--<th>虚拟数</th>-->
                <!--<th style="border:2px solid #ddd;border-right-color: transparent;">阅读量</th>-->
                <!--<th style="border:2px solid #ddd;border-right-color: transparent;">应用内</th>-->
                <!--<th style="border:2px solid #ddd;">应用外</th>-->
                <!--<th>评论数</th>-->
                <!--<th>收藏</th>-->
                <!--<th>状态</th>-->
                <th>状态</th>
                <th>说明</th>
                <th style="width:210px;">操作</th>
            </tr>
            </thead>
            <tbody >
            <!-- repeat begin -->
            <tr  ng-repeat="userItem in articleList">
                <td>{{userItem.articleId}}</td>
                <td style="cursor: pointer" tooltip="{{userItem.title}}" tooltip-trigger="mouseenter">{{userItem.title.length>15?userItem.title.slice(0,14)+'...':userItem.title}}</td>
                <td>{{userItem.authorName}}</td>
                <!--<td>{{userItem.isPlatform |isPlatform}}</td>-->
                <td>{{userItem.phoneNo|null_value_filter}}</td>
                <td>{{userItem.postedTime}}</td>
                <!--<td>{{userItem.isShow |isShow}}</td>-->
                <!--<td>{{userItem.readNumber}}</td>-->
                <!--<td>{{userItem.readNumber-userItem.readNumberOther}}</td>-->
                <!--<td>{{userItem.readNumberOther}}</td>-->
                <!--<td>{{userItem.virtualReading}}</td>-->
                <!--<td>{{userItem.evaluateNum}}</td>-->
                <!--<td>{{userItem.collectNum}}</td>-->
                <!--<td>{{userItem.status | isPlatform_status}}</td>-->
                <td>{{userItem.reviewStatus| boolean_reviewStatus}}</td>
                <td tooltip="{{userItem.instructions| boolean_instructionss}}">{{userItem.instructions| boolean_instructions}}</td>
                <td style="width:210px;">
                    <button id="fuzhi" tooltip="链接" tooltip-trigger="mouseenter"  class="btn btn-xs btn-info" data-clipboard-text="{{userItem.articleUrl}}&h5=0" ng-click="copy()">链</button>
                    <!--<a tooltip="评论管理" tooltip-trigger="mouseenter" class="btn btn-xs btn-success" ui-sref="cms.discuss({articleId:userItem.articleId})">评</a>-->
                    <a tooltip="扫码预览"  tooltip-trigger="mouseenter" class="btn btn-xs btn-primary" style="background-color:#5FD1ED;" ng-click="articlePreview(userItem.articleUrl+'&h5=0')"><i class="fa fa-eye"></i></a>
                    <a tooltip="预览" id="btn-preview" tooltip-trigger="mouseenter" class="btn btn-xs btn-primary" ng-click="articlePreview1(userItem)"><i class="fa fa-eye"></i></a>
                    <!--<a tooltip="预览" id="btn-preview" tooltip-trigger="mouseenter" class="btn btn-xs btn-primary" ng-click="articlePreview(userIte.articleUrl)"><i class="fa fa-eye"></i></a>-->
                    <!--<a tooltip="文章编辑" tooltip-trigger="mouseenter" class="btn btn-xs btn-warning" ui-sref="cms.editorArticleDetails({articleId:userItem.articleId})"><i class="icon-pencil"></i></a>-->
                    <a tooltip="审" tooltip-trigger="mouseenter" class="btn btn-xs btn-danger" ng-click="operate(userItem.articleId,userItem.reviewStatus,userItem.userId,userItem.title)">审</a>
                    <!--<a tooltip="文章删除" tooltip-trigger="mouseenter" class="btn btn-xs btn-danger" ng-click="removeMasterList(userItem.articleId,userItem.status)"><i class="fa fa-trash-o"></i></a>-->
                </td>
            </tr>
            <!-- repeat end -->
            </tbody>
        </table>
        <p style="display: inline-block; margin:21px 0;height: 30px;line-height: 30px;"> 显示 <strong>{{turnPage.totalItems}}</strong> 条中的 <strong>{{turnPage.itemsPerPage*(turnPage.currentPage-1)+1}}-{{ToNum}}</strong> 条</p>
        <pagination class="pull-right" first-text="{{turnPage.firstText}}" previous-text="{{turnPage.previousText}}" next-text="{{turnPage.nextText}}" last-text="{{turnPage.lastText}}" total-items="turnPage.totalItems" ng-model="turnPage.currentPage" max-size="turnPage.maxSize" num-pages="numPages" boundary-links="true" ng-change="dataChange()" class="pagination-sm">
        </pagination>
        <!-- 手机手机-->
        <div class="preview-layer">
            <div class="preview-bg"></div>
            <div style="top:0" class="preview-phone">
                <iframe id="preview-html" name="preview-html" src="app/views/article/preview-h5.html"></iframe>
            </div>
        </div>
    </div>
</div>
<script>
    var clipboard = new Clipboard('#fuzhi');
    clipboard.on('success', function(e) {
//        console.log(e);
    });

    clipboard.on('error', function(e) {
//        console.log(e);
    });
</script>